﻿CREATE PROCEDURE [dbo].[yaf_user_removepointsbytopicid](
                @TopicID INT,
                @Points  INT)
AS
    BEGIN
        DECLARE  @UserID INT
        SELECT @UserID = UserID
        FROM   yaf_Topic
        WHERE  TopicID = @TopicID
        UPDATE yaf_user
        SET    points = points - @Points
        WHERE  userid = @UserID
    END


